package Cartas;

public class Recompensa extends Cartas{

	public Recompensa(int v, String c){
		if (c.equals("rojo")||c.equals("verde")||c.equals("azul")||c.equals("amarillo")||c.equals("negro")){
			if(v>=0&&v<=4){
				this.v=v;
				this.c=c;
			}else
				throw new IllegalArgumentException("Valor incorrecto");
		}else
			throw new IllegalArgumentException("Color incorrecto");
	}
	
	public String getColor() {
		return super.getColor();
	}

	public void setColor(String s) {
		if (s.equals("rojo")||s.equals("verde")||s.equals("azul")||s.equals("amarillo")||s.equals("negro"))
			super.setColor(s);
		else
			throw new IllegalArgumentException("Color incorrecto");		
	}

	public int getValor() {
		return super.getValor();
	}

	public void setValor(int i) {
		if(i>=0&&i<=4){
			super.setValor(i);
		}else
			throw new IllegalArgumentException("Valor incorrecto");
	}
	
}
